/*
 * XML Type:  TaxW2MessageSetV1
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.TaxW2MessageSetV1
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML TaxW2MessageSetV1(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class TaxW2MessageSetV1Impl extends net.ofx.types.x2003.x04.impl.AbstractMessageSetVersionImpl implements net.ofx.types.x2003.x04.TaxW2MessageSetV1
{
    
    public TaxW2MessageSetV1Impl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TAXW2DNLD$0 = 
        new javax.xml.namespace.QName("", "TAXW2DNLD");
    private static final javax.xml.namespace.QName TAXYEARSUPPORTED$2 = 
        new javax.xml.namespace.QName("", "TAXYEARSUPPORTED");
    
    
    /**
     * Gets the "TAXW2DNLD" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getTAXW2DNLD()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TAXW2DNLD$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "TAXW2DNLD" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetTAXW2DNLD()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(TAXW2DNLD$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "TAXW2DNLD" element
     */
    public void setTAXW2DNLD(net.ofx.types.x2003.x04.BooleanType.Enum taxw2DNLD)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TAXW2DNLD$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TAXW2DNLD$0);
            }
            target.setEnumValue(taxw2DNLD);
        }
    }
    
    /**
     * Sets (as xml) the "TAXW2DNLD" element
     */
    public void xsetTAXW2DNLD(net.ofx.types.x2003.x04.BooleanType taxw2DNLD)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(TAXW2DNLD$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(TAXW2DNLD$0);
            }
            target.set(taxw2DNLD);
        }
    }
    
    /**
     * Gets array of all "TAXYEARSUPPORTED" elements
     */
    public java.util.Calendar[] getTAXYEARSUPPORTEDArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(TAXYEARSUPPORTED$2, targetList);
            java.util.Calendar[] result = new java.util.Calendar[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getCalendarValue();
            return result;
        }
    }
    
    /**
     * Gets ith "TAXYEARSUPPORTED" element
     */
    public java.util.Calendar getTAXYEARSUPPORTEDArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TAXYEARSUPPORTED$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target.getCalendarValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "TAXYEARSUPPORTED" elements
     */
    public net.ofx.types.x2003.x04.YearType[] xgetTAXYEARSUPPORTEDArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(TAXYEARSUPPORTED$2, targetList);
            net.ofx.types.x2003.x04.YearType[] result = new net.ofx.types.x2003.x04.YearType[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "TAXYEARSUPPORTED" element
     */
    public net.ofx.types.x2003.x04.YearType xgetTAXYEARSUPPORTEDArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.YearType target = null;
            target = (net.ofx.types.x2003.x04.YearType)get_store().find_element_user(TAXYEARSUPPORTED$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (net.ofx.types.x2003.x04.YearType)target;
        }
    }
    
    /**
     * Returns number of "TAXYEARSUPPORTED" element
     */
    public int sizeOfTAXYEARSUPPORTEDArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TAXYEARSUPPORTED$2);
        }
    }
    
    /**
     * Sets array of all "TAXYEARSUPPORTED" element
     */
    public void setTAXYEARSUPPORTEDArray(java.util.Calendar[] taxyearsupportedArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(taxyearsupportedArray, TAXYEARSUPPORTED$2);
        }
    }
    
    /**
     * Sets ith "TAXYEARSUPPORTED" element
     */
    public void setTAXYEARSUPPORTEDArray(int i, java.util.Calendar taxyearsupported)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TAXYEARSUPPORTED$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setCalendarValue(taxyearsupported);
        }
    }
    
    /**
     * Sets (as xml) array of all "TAXYEARSUPPORTED" element
     */
    public void xsetTAXYEARSUPPORTEDArray(net.ofx.types.x2003.x04.YearType[]taxyearsupportedArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(taxyearsupportedArray, TAXYEARSUPPORTED$2);
        }
    }
    
    /**
     * Sets (as xml) ith "TAXYEARSUPPORTED" element
     */
    public void xsetTAXYEARSUPPORTEDArray(int i, net.ofx.types.x2003.x04.YearType taxyearsupported)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.YearType target = null;
            target = (net.ofx.types.x2003.x04.YearType)get_store().find_element_user(TAXYEARSUPPORTED$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(taxyearsupported);
        }
    }
    
    /**
     * Inserts the value as the ith "TAXYEARSUPPORTED" element
     */
    public void insertTAXYEARSUPPORTED(int i, java.util.Calendar taxyearsupported)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(TAXYEARSUPPORTED$2, i);
            target.setCalendarValue(taxyearsupported);
        }
    }
    
    /**
     * Appends the value as the last "TAXYEARSUPPORTED" element
     */
    public void addTAXYEARSUPPORTED(java.util.Calendar taxyearsupported)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TAXYEARSUPPORTED$2);
            target.setCalendarValue(taxyearsupported);
        }
    }
    
    /**
     * Removes the ith "TAXYEARSUPPORTED" element
     */
    public void removeTAXYEARSUPPORTED(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TAXYEARSUPPORTED$2, i);
        }
    }
}
